package com.small.push.producer;

import com.small.push.bo.PushMsg;

import java.util.Collection;

/**
 * 消息生产者
 * @author dingyou
 * @version 1.0
 * @date 2019-01-09
 */
public interface MsgProducer {
    /**
     * 发送单条消息
     * @param topic
     * @param msg
     * @return
     */
    boolean send(String topic, PushMsg msg);

    /**
     * 发送多条消息
     * @param topic
     * @param msgs
     * @return
     */
    boolean send(String topic, Collection<? extends PushMsg> msgs);
}
